<?php
include_once 'module/controls.php';
$c = new controls();
?>
<div id="content">
    <div class="content_block">
        <h2 class="jquery_tab_title"><?php echo $phrase["manager_user"] ?></h2>
        <form method="post" action="<?=$url["home"] ?>/menu/process">
            <p>
                <?php echo $c->get_label($phrase["username"]) ?>
                <?php echo $c->get_text("username") ?>
                <span id="tick_username" class="tick"></span>
                <span id="cross_username" class="cross"></span>
            </p>

            <p>
                <?php echo $c->get_label($phrase["password"]) ?>
                <?php echo $c->get_password("password") ?>
                <span id="error_password"></span>
            </p>

            <p>
                <?php echo $c->get_label($phrase["confirm_password"]) ?>
                <?php echo $c->get_password("cpassword") ?>
                <span id="error_cpassword"><label id=""></label></span>
            </p>
            
            <p>
                <?php echo $c->get_label($phrase["fullname"]) ?>
                <?php echo $c->get_text("fullname") ?>
                <span id="error_email"></span>
            </p>
            
            <p>
                <?php echo $c->get_label($phrase["email"]) ?>
                <?php echo $c->get_text("email") ?>
                <span id="error_email"></span>
            </p>

            <p>
                <?php echo $c->get_label($phrase["phone"]) ?>
                <?php echo $c->get_text("phone") ?>
            </p>
            
            <p>
                <?php echo $c->get_checkbox("view", "view") ?>
                <?php echo $c->get_label("View", "inline") ?>
                <?php echo $c->get_checkbox("update", "update") ?>
                <?php echo $c->get_label("Update", "inline") ?>
                <?php echo $c->get_checkbox("delete", "delete") ?>
                <?php echo $c->get_label("Delete", "inline") ?>
            </p>
            
            <p>
                <?php echo $c->get_button("accept",$phrase["accept"]) ?>
            </p>
        </form>
    </div>
</div>
<script>
    $("#username").keydown(function(e){
        if(e.keyCode == "32"){
            return false;
        }
    });
    
    $(document).ready(function(){
        $('#username').keyup(username_check);
        $('#password').keyup(remove_mgs);
        $('#cpassword').keyup(remove_mgs);
        $('#phone').keyup(remove_mgs);
        $('#email').keyup(remove_mgs);
        $('#fullname').keyup(remove_mgs);
        $('.button').click(checkuser);
        $("#phone").keydown(isNumbericOnly);
    });
</script>